#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"

void test1()
{
	LTNode* plist = LTInit();
	LTPushFront(plist, 1);
	LTPrint(plist);
	LTPushFront(plist, 2);
	LTPrint(plist);
	LTPushFront(plist, 3);
	LTPrint(plist);
	LTPushFront(plist, 4);
	LTPrint(plist);
	LTPushFront(plist, 5);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);
	LTDestory(plist);
	plist = NULL;

}


void test2()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPrint(plist);
	LTPushBack(plist, 2);
	LTPrint(plist);
	LTPushBack(plist, 3);
	LTPrint(plist);
	LTPushBack(plist, 4);
	LTPrint(plist);
	LTPushBack(plist, 5);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTDestory(plist);
	plist = NULL;
}


void test3()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPushBack(plist, 5);
	/*LTNode* pos = LTFind(plist, 1);*/
	//if (pos != NULL)
	//{
	//	LTInsert(pos, 8);
	//}
	//LTErase(pos);
	LTPrint(plist);
	LTDestory(plist);
	plist = NULL;
}

int main()
{
	/*test1();*/
	test2();
	//test3();
	return 0;
}